package com.youi.entity;

import java.util.Date;
import java.util.List;

import com.youi.common.DelStatus;
import com.youi.util.DateUtil;
import com.youi.util.SmsUtil;

import java.io.Serializable;


/**
 * 供应商提现申请表（对账单）
 * @author XJY
 */
public class Merchantwithdraw implements Serializable {

	private Long id;							//ID
	private Date gmtCreated;					//创建时间
	private Integer delStatus;					//删除状态（0否 1是）
	private Date gmtModify;					    //最后修改时间
	private Long createdId;					    //创建人id
	private Long applyUserId;				    //审核人id
	private Long merchantId;					//供应商id
	private Date gmtMerchantApply;				//供应商审核时间
	private Date gmtApply;					    //审核时间
	private Integer status;					    //状态(-1作废 0未审核 1已审核(待复审) 2已审核(待打款) 3提现成功 4提现失败 5延迟打款)
	private Integer merchantStatus;			    //商家审核状态(-1作废 0未审核 1已通过)
	private Integer platformStatus;			    //平台审核状态(-1作废 0未审核 已审核)
 	private String twithdrawNo;				    //提现单号
	private String dateNo;					    //期号
	private String merchantCode;			    //供应商编号
	private String merchantName;			    //供应商名称
	private Integer orderCount;					//订单总数
	private Double orderAmount;				    //订单总额
	private Double merchantAmount;			    //供应商分润总额
	private Double platformAmount;			    //平台分润总额
	private Double profitRatio;				    //分润比例
	private String merchantIdea;			    //商家审核意见
	private String platformIdea;			    //平台审核意见
	private String remark;					    //备注
	
	private String createName;					//创建人名称
	private String applyUserName;				//审批人名称
	private List<Merchantwithdrawdetail> merchantwithdrawdetailList;  //对账单明细

    public Merchantwithdraw(){

    }

    public Merchantwithdraw(Long id,Date gmtCreated,Integer delStatus,Date gmtModify) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
    }
    
    public Merchantwithdraw(Long createdId,Long merchantId,String merchantCode,String merchantName) {
        this.gmtCreated=new Date();
        this.delStatus=DelStatus.NODEL	;
        this.gmtModify=gmtCreated;
        this.createdId=createdId;
        this.merchantId=merchantId;
        this.status=0;
        this.merchantStatus=0;
        this.platformStatus=0;
        String twithdrawNo="GYTX"+DateUtil.simpyMd.format(new Date())+SmsUtil.getRandom(5);
        this.twithdrawNo=twithdrawNo;
        this.dateNo=DateUtil.simpyMd.format(new Date());
        this.merchantCode=merchantCode;
        this.merchantName=merchantName;
     }


    public Merchantwithdraw(Long id,Date gmtCreated,Integer delStatus,Date gmtModify,Long createdId,Long applyUserId,Date gmtApply,Integer status,Integer merchantStatus,Integer platformStatus,String twithdrawNo,String dateNo,String merchantCode,String merchantName,Double orderAmount,Double merchantAmount,Double platformAmount,Double profitRatio,String merchantIdea,String platformIdea,String remark) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
       this.createdId=createdId;
       this.applyUserId=applyUserId;
       this.gmtApply=gmtApply;
       this.status=status;
       this.merchantStatus=merchantStatus;
       this.platformStatus=platformStatus;
       this.twithdrawNo=twithdrawNo;
       this.dateNo=dateNo;
       this.merchantCode=merchantCode;
       this.merchantName=merchantName;
       this.orderAmount=orderAmount;
       this.merchantAmount=merchantAmount;
       this.platformAmount=platformAmount;
       this.profitRatio=profitRatio;
       this.merchantIdea=merchantIdea;
       this.platformIdea=platformIdea;
       this.remark=remark;
    }


	public void setId(Long id){
		this.id=id;
	}

	public Long getId(){
		return id;
	}

	public void setGmtCreated(Date gmtCreated){
		this.gmtCreated=gmtCreated;
	}

	public Date getGmtCreated(){
		return gmtCreated;
	}

	public void setDelStatus(Integer delStatus){
		this.delStatus=delStatus;
	}

	public Integer getDelStatus(){
		return delStatus;
	}

	public void setGmtModify(Date gmtModify){
		this.gmtModify=gmtModify;
	}

	public Date getGmtModify(){
		return gmtModify;
	}

	public void setCreatedId(Long createdId){
		this.createdId=createdId;
	}

	public Long getCreatedId(){
		return createdId;
	}

	public void setApplyUserId(Long applyUserId){
		this.applyUserId=applyUserId;
	}

	public Long getApplyUserId(){
		return applyUserId;
	}

	public void setGmtApply(Date gmtApply){
		this.gmtApply=gmtApply;
	}

	public Date getGmtApply(){
		return gmtApply;
	}

	public void setStatus(Integer status){
		this.status=status;
	}

	public Integer getStatus(){
		return status;
	}

	public void setMerchantStatus(Integer merchantStatus){
		this.merchantStatus=merchantStatus;
	}

	public Integer getMerchantStatus(){
		return merchantStatus;
	}

	public void setPlatformStatus(Integer platformStatus){
		this.platformStatus=platformStatus;
	}

	public Integer getPlatformStatus(){
		return platformStatus;
	}

	public void setTwithdrawNo(String twithdrawNo){
		this.twithdrawNo=twithdrawNo;
	}

	public String getTwithdrawNo(){
		return twithdrawNo;
	}

	public void setDateNo(String dateNo){
		this.dateNo=dateNo;
	}

	public String getDateNo(){
		return dateNo;
	}

	public void setMerchantCode(String merchantCode){
		this.merchantCode=merchantCode;
	}

	public String getMerchantCode(){
		return merchantCode;
	}

	public void setMerchantName(String merchantName){
		this.merchantName=merchantName;
	}

	public String getMerchantName(){
		return merchantName;
	}

	public void setOrderAmount(Double orderAmount){
		this.orderAmount=orderAmount;
	}

	public Double getOrderAmount(){
		return orderAmount;
	}

	public void setMerchantAmount(Double merchantAmount){
		this.merchantAmount=merchantAmount;
	}

	public Double getMerchantAmount(){
		return merchantAmount;
	}

	public void setPlatformAmount(Double platformAmount){
		this.platformAmount=platformAmount;
	}

	public Double getPlatformAmount(){
		return platformAmount;
	}

	public void setProfitRatio(Double profitRatio){
		this.profitRatio=profitRatio;
	}

	public Double getProfitRatio(){
		return profitRatio;
	}

	public void setMerchantIdea(String merchantIdea){
		this.merchantIdea=merchantIdea;
	}

	public String getMerchantIdea(){
		return merchantIdea;
	}

	public void setPlatformIdea(String platformIdea){
		this.platformIdea=platformIdea;
	}

	public String getPlatformIdea(){
		return platformIdea;
	}

	public void setRemark(String remark){
		this.remark=remark;
	}

	public String getRemark(){
		return remark;
	}

	public Long getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(Long merchantId) {
		this.merchantId = merchantId;
	}

	public String getCreateName() {
		return createName;
	}

	public void setCreateName(String createName) {
		this.createName = createName;
	}

	public Integer getOrderCount() {
		return orderCount;
	}

	public void setOrderCount(Integer orderCount) {
		this.orderCount = orderCount;
	}

	public String getApplyUserName() {
		return applyUserName;
	}

	public void setApplyUserName(String applyUserName) {
		this.applyUserName = applyUserName;
	}

	public List<Merchantwithdrawdetail> getMerchantwithdrawdetailList() {
		return merchantwithdrawdetailList;
	}

	public void setMerchantwithdrawdetailList(List<Merchantwithdrawdetail> merchantwithdrawdetailList) {
		this.merchantwithdrawdetailList = merchantwithdrawdetailList;
	}

	public Date getGmtMerchantApply() {
		return gmtMerchantApply;
	}

	public void setGmtMerchantApply(Date gmtMerchantApply) {
		this.gmtMerchantApply = gmtMerchantApply;
	}

}
